package top.wanzc.java.basic.jdk9.to17.feature;

public class InstanceofEnhancement {
	
	private static class Parent {
		
	}
	
	private static class Child extends Parent {
		
	}
	
	public static void main(String[] args) {
		Parent p = new Child();
		if (p instanceof Child c) {
			System.out.println(c.getClass().getName());
		}
	}

}
